#include "Syntax/Object/Object.hpp"
#include "Syntax/Object/Boolean.hpp"
#include "Syntax/Object/Integer.hpp"
#include "Syntax/Object/String.hpp"

#include <memory>

std::map<TypeKind, std::string> Object::Names = {
    {TypeKind::Error, "Error"},
    {TypeKind::Bool, "Bool"},
    {TypeKind::Int, "Int"},
    {TypeKind::String, "String"},
};

SharedObject Object::NewInt(int64_t value)
{
    return std::make_shared<Integer>(value);
}

SharedObject Object::NewBool(bool value)
{
    return std::make_shared<Boolean>(value);
}

SharedObject Object::NewString(std::string value)
{
    return std::make_shared<String>(value);
}
